//
//  SETreatmentMethodTableViewController.m
//  kuaiyi
//
//  Created by Zhu Jinxin on 16/7/7.
//  Copyright © 2016年 Alphts. All rights reserved.
//

#import "SETreatmentMethodTableViewController.h"

@interface SETreatmentMethodTableViewController ()

@property(nonatomic,strong) NSArray* dataArray;

@end

@implementation SETreatmentMethodTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    
    [self.tableView setTableFooterView:[[UIView alloc] initWithFrame:CGRectZero]];
    
    _dataArray = @[@"手术治疗",@"药物治疗",@"保守治疗"];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return _dataArray.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
    
    UITableViewCell *Cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
    
    Cell.textLabel.text = _dataArray[indexPath.row];
    
    return Cell;
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (self.myBlock) {
        _myBlock(_dataArray[indexPath.row]);
    }
    
    [self.navigationController popViewControllerAnimated:YES];
    
    
    
}
    
    
    



@end
